package com.lyj.service.impl;

import com.lyj.mapper.SalaryMapper;
import com.lyj.pojo.Nurse;
import com.lyj.pojo.NurseSalary;
import com.lyj.service.SalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SalaryServiceImpl  implements SalaryService {

    @Autowired
    SalaryMapper salaryMapper;


    @Override
    public List<NurseSalary> queryAllSalary() {

        List<NurseSalary> nurseSalaryList = salaryMapper.queryAllSalary();
        return nurseSalaryList;
    }

    @Override
    public List<NurseSalary> querySalaryByName(String username) {

        List<NurseSalary> nurseSalaries = salaryMapper.querySalaryByName(username);
        return nurseSalaries;
    }

    @Override
    public Boolean updateBySalaryId(NurseSalary nurseSalary) {
        Boolean aBoolean = salaryMapper.updateBySalaryId(nurseSalary);
        return aBoolean;
    }

    @Override
    public Boolean delBySalaryId(int salaryId) {

        Boolean aBoolean = salaryMapper.delBySalaryId(salaryId);
        return aBoolean;
    }

    @Override
    public Boolean addSalaryByNurseId(NurseSalary nurseSalary) {

        Boolean aBoolean = salaryMapper.addSalaryByNurseId(nurseSalary);
        return aBoolean;
    }
}
